
' Copyright (c) 2015 ZZZ Projects. All rights reserved
' Licensed under MIT License (MIT) (https://github.com/zzzprojects/Z.ExtensionMethods)
' Website: http://www.zzzprojects.com/
' Feedback / Feature Requests / Issues : http://zzzprojects.uservoice.com/forums/283927
' All ZZZ Projects products: Entity Framework Extensions / Bulk Operations / Extension Methods /Icon Library


Public Module Extensions_216

	''' <summary>
	'''     Returns the natural (base e) logarithm of a specified number.
	''' </summary>
	''' <param name="d">The number whose logarithm is to be found.</param>
	''' <returns>
	'''     One of the values in the following table.  parameterReturn value Positive The natural logarithm of ; that is,
	'''     ln , or log eZero Negative Equal to Equal to.
	''' </returns>
	<System.Runtime.CompilerServices.Extension> _
	Public Function Log(d As [Double]) As [Double]
		Return Math.Log(d)
	End Function

	''' <summary>
	'''     Returns the logarithm of a specified number in a specified base.
	''' </summary>
	''' <param name="d">The number whose logarithm is to be found.</param>
	''' <param name="newBase">The base of the logarithm.</param>
	''' <returns>
	'''     One of the values in the following table. (+Infinity denotes , -Infinity denotes , and NaN denotes .)Return
	'''     value&gt; 0(0 &lt;&lt; 1) -or-(&gt; 1)lognewBase(a)&lt; 0(any value)NaN(any value)&lt; 0NaN != 1 = 0NaN != 1
	'''     = +InfinityNaN = NaN(any value)NaN(any value) = NaNNaN(any value) = 1NaN = 00 &lt;&lt; 1 +Infinity = 0&gt; 1-
	'''     Infinity =  +Infinity0 &lt;&lt; 1-Infinity =  +Infinity&gt; 1+Infinity = 1 = 00 = 1 = +Infinity0.
	''' </returns>
	''' ###
	''' <param name="a">The number whose logarithm is to be found.</param>
	<System.Runtime.CompilerServices.Extension> _
	Public Function Log(d As [Double], newBase As [Double]) As [Double]
		Return Math.Log(d, newBase)
	End Function
End Module


